<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>padding</title>
    <style type="text/css">
        div{
            width: 100px;
            height: 50px;
            border: solid 1px #f00;
            margin-bottom: 2px;
        }
        #div1{
            padding:0.5cm;
        }
        #div2{
            padding: 2.5cm;
        }
    </style>
</head>
<body>
<div id="div1">每个边拥有相等的内边距</div>
<div id="div2">内边距上下0.5cm，左右2.5cm</div>
</body>
</html>